const defaultState = {
  bannerlist: [],
  prolist: []
}

const reducer = (state = defaultState, action) => {
  const { type, payload } = action

  switch (type) {
    case 'CHANGE_BANNER_LIST':
      return Object.assign({}, state, { bannerlist: payload })
    case 'CHANGE_PRO_LIST':
      return Object.assign({}, state, { prolist: payload })
    default:
      return state
  }
}

export default reducer